using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.DirectX.Direct3D;
using System.Windows.Forms;
using System.Drawing;

namespace TgcViewer.Utils
{
    public class TgcDrawText
    {
        Microsoft.DirectX.Direct3D.Font dxFont;
        Sprite textSprite;

        public TgcDrawText(Device d3dDevice)
        {
            System.Drawing.Font theFont = new System.Drawing.Font("Verdana", 10, FontStyle.Regular, GraphicsUnit.Pixel);
            textSprite = new Sprite(d3dDevice);
            dxFont = new Microsoft.DirectX.Direct3D.Font(d3dDevice, theFont);
        }

        public void drawText(string text, int x, int y, Color color)
        {
            textSprite.Begin(SpriteFlags.AlphaBlend);

            dxFont.DrawText(textSprite, text, x, y, color);

            textSprite.End();
        }

    }
}
